export default {
  state: {
    themeColor: '#409EFF',
    oldThemeColor: '#409EFF'
  },
  mutations: {
    themeColor(state, themeColor) {
      state.themeColor = themeColor
    },
    oldThemeColor(state, oldThemeColor) {
      state.oldThemeColor = oldThemeColor
    }
  },
  actions: {
    onThemeChange({commit, state}, data) {
      commit('themeColor', data.color)
      commit('oldThemeColor', data.oldColor)
    }
  }
}
